summaryrefslogtreecommitdiff
path: root/app/[lng]/evcp/(evcp)/(system)/notice/page.tsx
diff options
context:
space:
mode:
authordujinkim <dujin.kim@dtsolution.co.kr>2025-09-29 08:01:53 +0000
committerdujinkim <dujin.kim@dtsolution.co.kr>2025-09-29 08:01:53 +0000
commitc7d37ec3e60c9197abc79738316ddae7c5bf8817 (patch)
tree9b045c7b7302d55f43d76565aa4fd5c6dd3a097b /app/[lng]/evcp/(evcp)/(system)/notice/page.tsx
parent82a2ce067c9b690cdf7775dfb0be94583f51ca29 (diff)
(대표님) 그룹라우터로 앱라우터 경로 정리
Diffstat (limited to 'app/[lng]/evcp/(evcp)/(system)/notice/page.tsx')
-rw-r--r--app/[lng]/evcp/(evcp)/(system)/notice/page.tsx60
1 files changed, 60 insertions, 0 deletions
diff --git a/app/[lng]/evcp/(evcp)/(system)/notice/page.tsx b/app/[lng]/evcp/(evcp)/(system)/notice/page.tsx
new file mode 100644
index 00000000..a4157d1b
--- /dev/null
+++ b/app/[lng]/evcp/(evcp)/(system)/notice/page.tsx
@@ -0,0 +1,60 @@
+import * as React from "react"
+import type { Metadata } from "next"
+import { unstable_noStore as noStore } from "next/cache"
+import { getServerSession } from "next-auth"
+import { Shell } from "@/components/shell"
+import { NoticeClient } from "@/components/notice/notice-client"
+import { InformationButton } from "@/components/information/information-button"
+import { getNoticeLists } from "@/lib/notice/service"
+import { authOptions } from "@/app/api/auth/[...nextauth]/route"
+
+export const metadata: Metadata = {
+ title: "공지사항 관리",
+ description: "페이지별 공지사항을 관리합니다.",
+}
+
+export default async function NoticePage() {
+ noStore()
+
+ // 세션에서 사용자 ID 가져오기
+ const session = await getServerSession(authOptions)
+ const currentUserId = session?.user?.id ? parseInt(session.user.id) : undefined
+
+
+ // 간단한 초기 데이터 로딩
+ const initialData = await getNoticeLists({
+ page: 1,
+ perPage: 50,
+ search: "",
+ sort: [{ id: "createdAt", desc: true }],
+ flags: [],
+ filters: [],
+ joinOperator: "and",
+ pagePath: "",
+ title: "",
+ content: "",
+ authorId: currentUserId || null,
+ isActive: true,
+ from: "",
+ to: "",
+ })
+
+
+ return (
+ <Shell className="gap-2">
+ <div className="flex items-center justify-between space-y-2">
+ <div className="flex items-center justify-between space-y-2">
+ <div>
+ <div className="flex items-center gap-2">
+ <h2 className="text-2xl font-bold tracking-tight">
+ 공지사항 관리
+ </h2>
+ <InformationButton pagePath="evcp/notice" />
+ </div>
+ </div>
+ </div>
+ </div>
+ <NoticeClient initialData={initialData?.data || []} currentUserId={currentUserId} />
+ </Shell>
+ )
+} \ No newline at end of file